package com.abysshal.icarte.datamodel;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import com.abysshal.icarte.datamodel.obj.Category;
import com.abysshal.icarte.datamodel.obj.Menu;
import com.abysshal.icarte.datamodel.obj.Order;

public class DataModel {
	public DataModel(){
		menus = new HashMap();
		categorys = new HashMap();
	}
	private Map<Long, Menu> menus;
	private Map<Long, Category> categorys;
	
	public void addMenu(Menu m){menus.put(m.getId(), m);}
	public void addCategory(Category c){ categorys.put(c.getId(), c);}
	
	public int createOrder(Order order){
		return 0;//TODO
	}
	
	public int updateOrder(Order order){
		return 0;//TODO
	}
	
	public Order getOrder(Long oid){
		return null;//TODO
	}
	
	public int startTable(int desknum){
		return 399;//TODO
	}
	
	public Iterator<Menu> getMenuIterator(){return menus.values().iterator();}
	
	public int totalMenus(){ return menus.size();}
	
	public Iterator<Category> getCategoryIterator(){ return categorys.values().iterator();}
	
	public int totalCategorys(){ return categorys.size();}
	
}
